package com.example.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@TableName("food")
public class Food extends Model<Food> {
    /**
      * 主键
      */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
      * 个数 
      */
    private String count;

    /**
      * 生产时间 
      */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 前端的日期格式到后端转为String
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") //后端的毫秒值到前端转为日期格式
    private Date createTime;

    /**
      * 过期时间 
      */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 前端的日期格式到后端转为String
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") //后端的毫秒值到前端转为日期格式
    private Date endTime;

    /**
      * 名称 
      */
    private String name;

    /**
      * 单价 
      */
    private String price;

    /**
      * 是否特价 
      */
    private String tejia;

    /**
      * 类型 
      */
    private String type;

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
         this.count = count;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
         this.createTime = createTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
         this.endTime = endTime;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
         this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
         this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
         this.price = price;
    }

    public String getTejia() {
        return tejia;
    }

    public void setTejia(String tejia) {
         this.tejia = tejia;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
         this.type = type;
    }

}